{% extends 'IbwJobeetBundle::layout.html.twig' %}

{% block stylesheets %}
    {{ parent() }}
    <link rel="stylesheet" href="{{ asset('bundles/ibwjobeet/css/jobs.css') }}" type="text/css" media="all" />
{% endblock %}

{% block content %}
    <div id="jobs">
        {% for category in categories %}
            <div>
                <div class="category_{{ category.slug }}">
                    <div class="category">
                        <div class="feed">
                            <a href="{{ path('ibw_category_show', { 'slug': category.slug, 'page':1, '_format': 'atom' }) }}">Feed</a>
                        </div>
                        <h1><a href="{{ path('ibw_category_show', { 'slug': category.slug, 'page':1 }) }}">{{ category.name }}</a></h1>
                    </div>
                    {{ include ('IbwJobeetBundle:Job:list.html.twig', {'jobs': category.activejobs}) }}
                    {% if category.morejobs %}
                        <div class="more_jobs">
                            {% trans with {'%count%': '<a href="' ~ path('ibw_category_show', { 'slug': category.slug, 'page':1 }) ~ '">' ~  category.morejobs ~ '</a>'} %}and %count% more...{% endtrans %}
                        </div>
                    {% endif %}
                </div>
            {% endfor %}
        </div>
    {% endblock %}